home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsICacheService.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  92 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is nsICacheService.idl, released
  17.  * February 10, 2001.
  18.  *
  19.  * The Initial Developer of the Original Code is
  20.  * Netscape Communications Corporation.
  21.  * Portions created by the Initial Developer are Copyright (C) 2001
  22.  * the Initial Developer. All Rights Reserved.
  23.  *
  24.  * Contributor(s):
  25.  *   Gordon Sheridan <gordon@netscape.com>
  26.  *   Patrick Beard   <beard@netscape.com>
  27.  *   Darin Fisher    <darin@netscape.com>
  28.  *
  29.  * Alternatively, the contents of this file may be used under the terms of
  30.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  31.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  32.  * in which case the provisions of the GPL or the LGPL are applicable instead
  33.  * of those above. If you wish to allow use of your version of this file only
  34.  * under the terms of either the GPL or the LGPL, and not to allow others to
  35.  * use your version of this file under the terms of the MPL, indicate your
  36.  * decision by deleting the provisions above and replace them with the notice
  37.  * and other provisions required by the GPL or the LGPL. If you do not delete
  38.  * the provisions above, a recipient may use your version of this file under
  39.  * the terms of any one of the MPL, the GPL or the LGPL.
  40.  *
  41.  * ***** END LICENSE BLOCK ***** */
  42.  
  43. #include "nsISupports.idl"
  44. #include "nsICache.idl"
  45.  
  46. interface nsISimpleEnumerator;
  47. interface nsICacheListener;
  48. interface nsICacheSession;
  49. interface nsICacheVisitor;
  50.  
  51. [scriptable, uuid(de114eb4-29fc-4959-b2f7-2d03eb9bc771)]
  52. interface nsICacheService : nsISupports
  53. {
  54.     /**
  55.      * Create a cache session
  56.      *
  57.      * A cache session represents a client's access into the cache.  The cache
  58.      * session is not "owned" by the cache service.  Hence, it is possible to
  59.      * create duplicate cache sessions.  Entries created by a cache session
  60.      * are invisible to other cache sessions, unless the cache sessions are
  61.      * equivalent.
  62.      *
  63.      * @param clientID - Specifies the name of the client using the cache.
  64.      * @param storagePolicy - Limits the storage policy for all entries
  65.      *   accessed via the returned session.  As a result, devices excluded
  66.      *   by the storage policy will not be searched when opening entries
  67.      *   from the returned session.
  68.      * @param streamBased - Indicates whether or not the data being cached
  69.      *   can be represented as a stream.  The storagePolicy must be 
  70.      *   consistent with the value of this field.  For example, a non-stream-
  71.      *   based cache entry can only have a storage policy of STORE_IN_MEMORY.
  72.      * @return new cache session.
  73.      */
  74.     nsICacheSession createSession(in string                 clientID,
  75.                                   in nsCacheStoragePolicy   storagePolicy,
  76.                                   in boolean                streamBased);
  77.  
  78.     /**
  79.      * Visit entries stored in the cache.  Used to implement about:cache.
  80.      */
  81.     void visitEntries(in nsICacheVisitor visitor);
  82.  
  83.     /**
  84.      * Evicts all entries in all devices implied by the storage policy.
  85.      */
  86.     void evictEntries(in nsCacheStoragePolicy  storagePolicy);
  87. };
  88.  
  89. %{C++
  90. #define NS_CACHESERVICE_EMPTYCACHE_TOPIC_ID "cacheservice:empty-cache"
  91. %}
  92.